-- GENERATED SPELL FOR [Gordunni Elementalist] --


function spell0_22144(pUnit, Event) --@Bloodlust,n/a--
pUnit:FullCastSpellOnTarget(6742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22144', 30292, 1)
end

function spell1_22144(pUnit, Event) --@Fire Nova Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(32062,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_22144', 1, 1)
end

function spell2_22144(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_22144', 3000, 1)
end

function spell3_22144(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22144', 0, 1)
end

function Sorts_22144(pUnit, Event)
local choix_sorts_22144 = math.random(0, 3)
if choix_sorts_22144 == 0 then
pUnit:RegisterEvent('spell0_22144', 1, 1)
end
if choix_sorts_22144 == 1 then
pUnit:RegisterEvent('spell1_22144', 1, 1)
end
if choix_sorts_22144 == 2 then
pUnit:RegisterEvent('spell2_22144', 1, 1)
end
if choix_sorts_22144 == 3 then
pUnit:RegisterEvent('spell3_22144', 1, 1)
end
end

function mob22144_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22144', math.random(1500, 3000), 1)
end

function mob22144_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22144_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22144_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22144, 1, 'mob22144_Action')
RegisterUnitEvent(22144, 2, 'mob22144_Leave')
RegisterUnitEvent(22144, 3, 'mob22144_Kill')
RegisterUnitEvent(22144, 4, 'mob22144_Die')
